﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Qas.CommonLogic.BusinessObjects
{
    public class BSStruct
    {
        List<Task> tasks = new List<Task>();
        List<Condition> conditions = new List<Condition>();
        double moneyRequired;
        List<Task> otherTask = new List<Task>();
        List<Condition> smallCond = new List<Condition>();

        /// <summary>
        /// Конструктор
        /// </summary>
        public BSStruct(List<Task> task, List<Condition> conditions, double moneyRequired, List<Task> otherTask,
                                List<Condition> smallCond)
        {
            //this.tasks = tasks; проверить?
            if (this.tasks.Count != 0)
            {
                this.tasks.Clear();

                this.tasks.AddRange(task);
            }
            else
            {
                this.tasks.AddRange(task);
            }
            //this.tasks.Add(task);
            this.conditions = conditions;
            this.moneyRequired = moneyRequired;
            if (this.otherTask.Count != 0)
            {
                this.otherTask.Clear();

                this.otherTask.AddRange(otherTask);
            }
            else
            {
                this.otherTask.AddRange(otherTask);
            }
            this.smallCond = smallCond;
        }

        public List<Task> Tasks
        {
            get
            {
                return this.tasks;
            }
        }

        public List<Condition> Conditions
        {
            get
            {
                return this.conditions;
            }
        }

        public double MoneyRequired
        {
            get
            {
                return this.moneyRequired;
            }
        }

        public List<Task> OtherTasks
        {
            get
            {
                return this.otherTask;
            }
        }
        public List<Condition> SmallCond
        {
            get
            {
                return this.smallCond;
            }
        }
    }
}
